import tkinter as tk
import tkinter.messagebox
from tkinter import filedialog

class FileDialog:
    def __init__(self):
        pass
    def AskSaveFile(self):
        tkinter.Tk().withdraw()
        return filedialog.asksaveasfilename(filetypes=[('FIF文件', '*.fif')],defaultextension=[('FIF文件', '')])
    def AskLoadFile(self,extension='fif'):
        tkinter.Tk().withdraw()
        return filedialog.askopenfile(filetypes=[('{}文件'.format(extension), '*.{}'.format(extension))], defaultextension=[('{}文件'.format(extension), '*.{}'.format(extension))]).name
if __name__=='__main__':
    print(FileDialog().AskSaveFile())